package com.edu.framework.websocket.message.base;


import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class Message<T>{

    private String type;
    @JSONField(serialize = true, deserialize = true)
    private Map<String,T> data = new HashMap<>();

    public void addData(String key,T value){
        this.data.put(key,value);
    }
}
